Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CONSUMERBANK-528] Handle invalid phone numbers in Link signup more gracefully #4269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mats-stripe
Copy link
Collaborator

Summary

This updates the Link Login pane to more gracefully handle errors related to the phone number. Previously, we had very little input validation on the phone textfield, and any API errors related to an improperly formatted phone number would lead to the terminal error pane. This attempts to catch phone number related API errors, and present them under the phone textfield.

Motivation

CONSUMERBANK-528

Testing

Screen.Recording.2024-11-14.at.2.51.05.PM.mov

Changelog

N/a

@mats-stripe mats-stripe requested review from a team as code owners November 15, 2024 15:00

// Hack to determine if the error is related to the phone number.
// If so, show a generic error message under the phone textfield.
if let errorMessage = stripeAPIError.message, errorMessage.contains("phone") {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if I should search for the localized string "phone" here, or hardcode the english word. Are remote error messages localized?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant